package gui;

import javax.swing.*;

import java.awt.*;
import java.awt.event.*;

/**
 * @author Besitzer
 *
 */
public class UserMenu extends JPanel{

	private JLabel lbl_Header;
	private JButton btn_Back;
	private JButton btn_DeleteAcc;
	private JButton btn_CreateAcc;
	private JButton btn_ViewAccounts;
	
	public UserMenu() {
		
		setPreferredSize(new Dimension(550, 400));
		setLayout(null);
		
		lbl_Header = new JLabel("User Menu");
		lbl_Header.setFont(new Font("SansSerif", Font.BOLD, 26));
		lbl_Header.setBounds(215, 44, 133, 34);
		add(lbl_Header);
		
		btn_Back = new JButton("Back");
		btn_Back.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_Back.setBounds(94, 254, 120, 38);
		add(btn_Back);
		
		btn_DeleteAcc = new JButton("Delete an Account");
		btn_DeleteAcc.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_DeleteAcc.setBounds(329, 159, 163, 38);
		add(btn_DeleteAcc);
		
		btn_CreateAcc = new JButton("Create an Account");
		btn_CreateAcc.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_CreateAcc.setBounds(329, 110, 163, 38);
		add(btn_CreateAcc);
		
		btn_ViewAccounts = new JButton("View all Accounts");
		btn_ViewAccounts.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_ViewAccounts.setBounds(329, 208, 163, 38);
		add(btn_ViewAccounts);
	}
	
	public JButton getBack(){
		return btn_Back;
	}
	
	public JButton getDelete(){
		return btn_DeleteAcc;
	}
	
	public JButton getView(){
		return btn_ViewAccounts;
	}
	
	public JButton getCreate(){
		return btn_CreateAcc;
	}
	
	public void addActionListener(ActionListener e){
		btn_Back.addActionListener(e);
		btn_DeleteAcc.addActionListener(e);
		btn_CreateAcc.addActionListener(e);
		btn_ViewAccounts.addActionListener(e);
	}

} // end class
